package com.binvshe.binvshe.contacts;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.binvshe.binvshe.R;
import com.binvshe.binvshe.account.AccountManager;
import com.pachong.android.baseuicomponent.activity.BaseActivity;

import butterknife.Bind;
import butterknife.OnClick;


/**
 * 添加好友
 *
 * @Author: PV
 * @E-mail: pengveivei@sina.cn
 * @CreateDate: 2016-10--26
 * @Version: 1.0.0
 */
public class AddFriendActivity extends BaseActivity {
    FriendContactsFragment listFrag;

    @Bind(R.id.tvMyID)
    TextView tvMyID;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setTitle("添加好友");
        enableBackButton();

        listFrag = new FriendContactsFragment();
        getSupportFragmentManager().beginTransaction().add(R.id.lytFriendList, listFrag).commit();
        tvMyID.setText("我的ID："+ AccountManager.getCurrentAccount().getUserId());
    }

    @OnClick(R.id.lytSearch)
    public void onBtnSearchClicked() {
        SearchFriendActivity.start(this, SearchFriendActivity.FLAG_ADD_FRIEND);
    }

    @Override
    public View createDataView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        return layoutInflater.inflate(R.layout.activity_add_friend, null);
    }


    @Override
    public View createEmptyView(LayoutInflater inflater) {
        return super.createEmptyView(inflater);
    }
}
